package com.woniuxy.his.controller;


import com.woniuxy.his.common.Result;
import com.woniuxy.his.controller.form.AddImageCheckForm;
import com.woniuxy.his.service.IImageCheckService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 影像表 前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2021-08-28
 */
@RestController
//@RequestMapping("/his/image-check")
@Slf4j
@CrossOrigin("*")
public class ImageCheckController {
    @Resource
    private IImageCheckService imageCheckService;

    /**
     * 影像检查结果生成接口
     * @return
     */
    @PostMapping("/imageFormGeneration")
    public Result imageFormGeneration(@RequestBody AddImageCheckForm addImageCheckForm){
        log.info("影像结果生成入参：{}",addImageCheckForm);
        //调用影像生成方法接口
        boolean isGo=imageCheckService.inageGenerateResults(addImageCheckForm);

        return isGo ? Result.success("20000", "影像结果生成成功！", null) : Result.fail("40004", "数据库繁忙！", null);
    }

}

